package foundamental.version1;

/**
 * Created by chenjun on 2017/12/18.
 */
public class B {
    public void bm1(){
        System.out.println("method one in b");
    }


    public void bm2(A a){
        System.out.println("method 2 in b");
        a.am2(); //由于用的是同一个A对象，所以A对象i的值是不断增大的
       // new A().am2(); //i的值输出时总是1
    }


    public void bm3(A a){
        System.out.println("method 2 in b");
        a.am3();
    }
}
